<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>添加系统权限</title>
		<%@ include file="/common/meta.jsp" %>
    <%@ include file="/common/import.jsp" %>
	<%@ include file="uct-import.jsp" %>
	
<script type="text/javascript">

	$(function(){
		$('#inputForm').form({
			url:'${ctx}/uct/sys/save.action',
		    onSubmit:function(){
		    	return $("#inputForm").form("validate");
		    },
		    success:function(data){
		    	var result = jQuery.parseJSON(data);
		    	if(result.flag=='T'){
		    		$.messager.alert('提交结果', '操作成功', 'info',function(){
		    			parent.closeAddWin();
		    		});
		    		parent.reload();
		    	}else{
		    		$.messager.alert('提交结果', result.msg, 'info');
		    	}        
		    }
		});
		
		//修改时 系统标识为readOnly
		if("${item.sysId}"!=null&&"${item.sysId}"!=''){
			$("#sysEname").attr("readOnly",true);
		}
	}) ;
</script>
</head>
<body>	
<div id="tip">
	<form id="inputForm" name="inputForm" method="post" action="${ctx}/uct/sys/save.action">
		<input type="hidden" name="formToken" id="formToken" value="${formToken}">
		<input type="hidden" name="sysId" id="sysId" value="${item.sysId}"/>
		<table class="datagrid-body" >
			<tr >
				<td class="datagrid-header">中文名称<span style="color:red;" >*</span></td>
				<td>
				<input name="sysCname"  id="sysCname" value="${item.sysCname}"
				class="easyui-validatebox" data-options="required:true,validType:'length[1,50]'" size="50"  
				missingMessage="请输入名称" invalidMessage="应为1~50个字" />				
				</td>
			</tr>
			
			<tr>
				<td class="datagrid-header">英文标识<span style="color:red;" >*</span></td>
				<td>
				<input name="sysEname"  id="sysEname" value="${item.sysEname}"
				class="easyui-validatebox" data-options="required:true,validType:'length[1,50]'" size="50" 
				missingMessage="请输入英文标识" invalidMessage="应为1~50个英文字母" />
				</td>
			</tr>
			
			<tr>
				<td class="datagrid-header">排序值<span style="color:red;" >*</span></td>
				<td>
				<input id="orderNum" name="orderNum"  value="${item.orderNum}"
				class="easyui-numberbox" data-options="required:true,validType:'length[1,50]'" size="10"
				missingMessage="请输入排序值" invalidMessage="应为1~10个数字" />
				</td>
			</tr>	
			
				<tr>
				<td class="datagrid-header"></td>
				<td >
				<a href="#" class="easyui-linkbutton" iconCls="icon-save"
					onClick="$('#inputForm').submit();">提交</a>	
				</td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>

